package spec.ecore;

import java.util.HashMap;
import java.util.Map;

import org.eclipse.emf.ecore.EClassifier;
import org.eclipse.emf.ecore.EcorePackage;

public class EcoreDataType {

	public static EClassifier JType2EType(String JType) {
		
		Map<String, EClassifier> mapping = new HashMap<String, EClassifier>();
		mapping.put("short",	EcorePackage.Literals.ESHORT);
		mapping.put("int",		EcorePackage.Literals.EINT);
		mapping.put("float",	EcorePackage.Literals.EFLOAT);
		mapping.put("double",	EcorePackage.Literals.EDOUBLE);
		mapping.put("boolean",	EcorePackage.Literals.EBOOLEAN);
		mapping.put("char",		EcorePackage.Literals.ECHAR);
		mapping.put("byte",		EcorePackage.Literals.EBYTE);
		mapping.put("String",	EcorePackage.Literals.ESTRING);
		
		return mapping.get(JType);
	}
}
